package com.example.selfproperties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/1/14 0014.
 在application.properties中的各个参数之间也可以直接引用来使用，就像下面的设置：
 *com.kfit.blog.desc=${com.kfit.blog.name}正在写《${com.kfit.blog.title}》
 *
 * 在一些情况下，有些参数我们需要希望它不是一个固定的值，比如密钥、服务端口等。
 * Spring Boot的属性配置文件中可以通过${random}来产生int值、long值或者string字符串，来支持属性的随机值。
 */

@ConfigurationProperties(prefix = "com.kfit.blog")
@Component
public class Prop4 {

    //松散匹配
    private String name;
    private String title;
    private String desc;

    //随机数
    private String value;
    private String number;
    private String bignumber;
    private String test1;
    private String test2;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getBignumber() {
        return bignumber;
    }

    public void setBignumber(String bignumber) {
        this.bignumber = bignumber;
    }

    public String getTest1() {
        return test1;
    }

    public void setTest1(String test1) {
        this.test1 = test1;
    }

    public String getTest2() {
        return test2;
    }

    public void setTest2(String test2) {
        this.test2 = test2;
    }
}
